import qs from 'qs'
import requset from "../../utils/request";

enum URL {
  login = '/v1/admin/login',
  LoginData = '/v1/admin/loginData',
  logout = '/v1/admin/logout',
}

export const login = (data: APIUSER.LoginParams) => requset<APIUSER.LoginRsp>({ url: URL.login,method:"POST", data:qs.stringify(data) })

const loginData = () => requset<APIUSER.LoginData>({ url: URL.LoginData,data:{},method:"GET", })

const logout = () => requset<APIUSER.LogoutRsp>({ url: URL.logout ,method:"POST",})


export default { login, loginData, logout };
